﻿Imports extranet.BE
Partial Class PubRankingMaster
    Inherits System.Web.UI.MasterPage

    Protected Sub lnkTrocarModo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lnkTrocarModo.Click
        Response.Redirect("~/AdmEntrada.aspx")
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If DirectCast(Session("objBEUsuario"), BEUsuario) Is Nothing Then
            lblUsuario.Text = "Usuário Não Logado"
        Else
            Dim objBEUsuario As BEUsuario = Session("objBEUsuario")
            lblUsuario.Text = objBEUsuario.Nome
            If objBEUsuario.GrupoAcesso.Nome.ToUpper() = "ADMIN" Then
                lnkTrocarModo.Visible = True
            Else
                lnkTrocarModo.Visible = False
            End If
        End If
    End Sub

    Protected Sub ImageButton1_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles ImageButton1.Click
        Response.Redirect("~/PubEntrada.aspx")
    End Sub
End Class

